<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>

<html>
    <head>
        <jsp:include page="./../util/configurationPage.jsp"/>
        <link href="bootstrap/css/signin.css" rel="stylesheet">
    </head>

    <body>

        <div class="container">
            <form method="POST"  action="j_spring_security_check" class="form-signin">

                <h2 class="form-signin-heading">Zaloguj się</h2>
                <input  name="j_username"   type="text" class="form-control" placeholder="Login" />

                <input  name="j_password"  type="password" class="form-control" placeholder="Password"/>

                <button class="btn btn-lg btn-primary btn-block" type="submit">Zaloguj</button>

                <br>
                <c:if test="${not empty SPRING_SECURITY_LAST_EXCEPTION}">
                    <div class="alert alert-danger"> <strong>Oh snap!</strong> Your login attempt was not successful due to <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.</div>


                </c:if>
            </form>
        </div>

    </body>
</html>

